package StudyCode.summary.myfile;

import javax.swing.*;
import java.io.File;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetFileTypeByJFileChooser {
	public static void main(String[] argv) {
		JFileChooser chooser = new JFileChooser();
		File file = new File("E:\\迅雷下载\\test1.txt");
		String fileTypeName = chooser.getTypeDescription(file);
		System.out.println("文件 " + file + " 类型描述是: " + fileTypeName);
	}
}
